package SwingComponents;

import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import javax.swing.JButton;

public class IDButton extends JButton {

    private Integer id;
    private String word;
    private int x;
    private int y;

    public IDButton(int id, int x, int y, String word) {
        this.id = id;
        this.word = word;
        final String aux = word + " " + this.id.toString();
        final int auxX = x;
        final int auxY = y;
        TransparentPanel transparentPanel = new TransparentPanel(){
            @Override
            public void paint (Graphics g){
                setForeground(Color.BLUE);
                g.setFont(new Font("Dialog", Font.ROMAN_BASELINE, 18));
                g.drawString(aux, auxX, auxY);
            }
        };
        this.add(transparentPanel);
    }

    @Override
    public void paint(Graphics g) {
        
        super.paint(g);
    }

    public int getId() {
        return id;
    }
}
